home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-02-05 | 1.9 KB | 91 lines | [TEXT/MSCT] |
- //
- // Pages Where Images Occur.M1S: show image list and show pages
- // where each image occurs.
- //
-
- //
- // *************************************
- // Procedures
- // *************************************
- //
-
- proc imageUsedProc
- if it <> theJob then
- imagePageCount = imagePageCount[it.code] + 1
- imagePageCount[it.code] = imagePageCount
- imagePageList[it.code,imagePagecount] = pageList[pageNr]
- end if
- endproc
-
- proc imageProc
- if it <> theJob then
- imageCount = imageCount + 1
- imageList[imageCount] = it
- imagePageCount[it.code] = 0
- end if
- endproc
-
- proc pageProc
- pageCount = pageCount + 1
- pageList[pageCount] = it
- endproc
-
- //
- // Execute a procedure for all images
- //
- theJob = it
-
- print "Used Image List for " + theJob.NAME
-
- pageCount = 0
- on page do pageProc
- scan theJob links uses,contains,overlaps
- scan reset
-
- imageCount = 0
- on document do imageProc
- scan theJob links uses,contains,overlaps,defines
- scan reset
-
- on document do imageUsedProc
- pageNr = 0
- while pageNr < pageCount do
- pageNr = pageNr + 1
- pageImageCount[pageNr] = 0
- scan pageList[pageNr] links uses,contains,overlaps
- wend
- scan reset
-
- imageNr = 0
- while imageNr < imageCount do
- imageNr = imageNr + 1
- image = imageList[imageNr]
- print "Image '" + image.name + "' (" + image.class_name;
- imagePageCount = imagePageCount[image.code]
- pageNr = 0
- while pageNr < imagePageCount do
- if pageNr = 0 then
- if imagePageCount = 1 then
- print ") occurs on page"
- else
- print ") occurs on pages"
- end if
- end if
- pageNr = pageNr + 1
- page = imagePageList[image.code,pageNr]
- if page.printed_pagenumber <> page.pagenumber then
- print " " + page.pagenumber + " (" + page.printed_pagenumber + ")"
- else
- print " " + page.pagenumber
- end if
- wend
- if pageNr = 0 then
- print ") is not used"
- end if
- wend
- if imageCount = 0 then
- print "No images in document"
- end if
-
- print "---------------------------------------"
-